import 'normalize.css/normalize.css'
import './assets/base.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
// 导入状态管理持久化存储
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

import App from './App.vue'
import router from './router'

import i18n from '@/i18n'  // 导入国际化组件
import ElementPlus from 'element-plus' // 导入element-plus
import 'element-plus/dist/index.css'  // 导入element-plus样式
import * as ElementPlusIconsVue from '@element-plus/icons-vue' // 导入element-plus的icon图标
import NProgress from 'nprogress' // 导入页面加载进度条效果
import 'nprogress/nprogress.css' //样式引入
import AnimatedNumber from 'animated-number-vue3' // 导入数字动画效果

const app = createApp(App)
const pinia = createPinia()

pinia.use(piniaPluginPersistedstate)
app.use(pinia)
app.use(router)
app.use(i18n)
app.use(NProgress)
app.use(ElementPlus)
app.use(AnimatedNumber)
// 注册element-plus的icon图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.mount('#app')
